package com.ly.chatsimple.ui.chat.state

import java.text.SimpleDateFormat
import java.util.Locale

data class ChatRecord(
    val isSender: Boolean = true,
    val content: String = "",
    val timestamp: Long = System.currentTimeMillis(),
    val sendSuccess: Boolean = true,
) {

    val date get() = mDateFormat.format(timestamp) ?: ""

    companion object {
        private val mDateFormat = SimpleDateFormat("MM.dd HH:mm:ss", Locale.CHINESE)
    }
}
